package com.rabbiter.oes.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@ApiModel(value = "留言表")
@TableName(value = "message")
public class Message {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "留言编号")
    private Integer id;

    @TableField(value = "title")
    @ApiModelProperty(value = "标题")
    private String title;

    @TableField(value = "content")
    @ApiModelProperty(value = "留言内容")
    private String content;

    @TableField(value = "time")
    @ApiModelProperty(value = "留言时间")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8")
    private Date time;

    @TableField(exist = false)
    @ApiModelProperty(value = "回复信息")
    List<Replay> replays;


}